package tech.yunjing.log;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import tech.yunjing.base.core.annotation.EnableGlobalRedis;
import tech.yunjing.base.core.annotation.EnableRegisterService;
import tech.yunjing.base.core.bean.GlobalRedisTemplate;
import tech.yunjing.base.core.dao.redis.RedisTemplateUtil;


/**
 * @author miou
 * Created by FYX on 2017/2/14 0014.
 */
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
@EnableCircuitBreaker
@EnableRegisterService
@EnableGlobalRedis
public class LogApplication {

    public static void main(String[] args) {
        SpringApplication.run(LogApplication.class, args);
    }

    @Autowired
    private GlobalRedisTemplate globalRedisTemplate;

    @Bean
    RedisTemplateUtil redisTemplateUtil(){
        return new RedisTemplateUtil(globalRedisTemplate);
    }
}
